<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>HTMLParser.HTMLParser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        Module&nbsp;HTMLParser ::
        Class&nbsp;HTMLParser
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="HTMLParser.HTMLParser-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class HTMLParser</h2>

<pre class="base-tree">
<a href="markupbase.ParserBase-class.html"><code>ParserBase</code></a> --+
             |
            <b>HTMLParser</b>
</pre><br />

<hr/>

<pre class="literalblock">
Find tags and other markup and call handler functions.

Usage:
    p = HTMLParser()
    p.feed(data)
    ...
    p.close()

Start tags are handled by calling self.handle_starttag() or
self.handle_startendtag(); end tags by self.handle_endtag().  The
data between tags is passed from the parser to the derived class
by calling self.handle_data() with the data as argument (the data
may be split up in arbitrary chunks).  Entity references are
passed by calling self.handle_entityref() with the entity
reference as the argument.  Numeric character references are
passed to self.handle_charref() with the string containing the
reference as the argument.
</pre>
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="HTMLParser.HTMLParser-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Initialize and reset this instance.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="check_for_whole_start_tag"></a><span class="summary-sig"><span class="summary-sig-name">check_for_whole_start_tag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>i</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="clear_cdata_mode"></a><span class="summary-sig"><span class="summary-sig-name">clear_cdata_mode</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="HTMLParser.HTMLParser-class.html#close" class="summary-sig-name"><code>close</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Handle any buffered data.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="error"></a><span class="summary-sig"><span class="summary-sig-name">error</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>message</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="HTMLParser.HTMLParser-class.html#feed" class="summary-sig-name"><code>feed</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
<br />
Feed data to the parser.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="HTMLParser.HTMLParser-class.html#get_starttag_text" class="summary-sig-name"><code>get_starttag_text</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Return full source of start tag: '&lt;...&gt;'.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="goahead"></a><span class="summary-sig"><span class="summary-sig-name">goahead</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>end</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_charref"></a><span class="summary-sig"><span class="summary-sig-name">handle_charref</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>name</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_comment"></a><span class="summary-sig"><span class="summary-sig-name">handle_comment</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_data"></a><span class="summary-sig"><span class="summary-sig-name">handle_data</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_decl"></a><span class="summary-sig"><span class="summary-sig-name">handle_decl</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>decl</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_endtag"></a><span class="summary-sig"><span class="summary-sig-name">handle_endtag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>tag</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_entityref"></a><span class="summary-sig"><span class="summary-sig-name">handle_entityref</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>name</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_pi"></a><span class="summary-sig"><span class="summary-sig-name">handle_pi</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_startendtag"></a><span class="summary-sig"><span class="summary-sig-name">handle_startendtag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>tag</span>,
          <span class=summary-sig-arg>attrs</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="handle_starttag"></a><span class="summary-sig"><span class="summary-sig-name">handle_starttag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>tag</span>,
          <span class=summary-sig-arg>attrs</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="parse_endtag"></a><span class="summary-sig"><span class="summary-sig-name">parse_endtag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>i</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="parse_pi"></a><span class="summary-sig"><span class="summary-sig-name">parse_pi</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>i</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="parse_starttag"></a><span class="summary-sig"><span class="summary-sig-name">parse_starttag</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>i</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="HTMLParser.HTMLParser-class.html#reset" class="summary-sig-name"><code>reset</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Reset this instance.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="set_cdata_mode"></a><span class="summary-sig"><span class="summary-sig-name">set_cdata_mode</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="unescape"></a><span class="summary-sig"><span class="summary-sig-name">unescape</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>s</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="unknown_decl"></a><span class="summary-sig"><span class="summary-sig-name">unknown_decl</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
</td></tr>
  <tr><td colspan="2">
    <b>Inherited from <a href="markupbase.ParserBase-class.html"><code>ParserBase</code></a>:</b>
      <a href="markupbase.ParserBase-class.html#getpos"><code>getpos</code></a>, 
      <a href="markupbase.ParserBase-class.html#parse_comment"><code>parse_comment</code></a>, 
      <a href="markupbase.ParserBase-class.html#parse_declaration"><code>parse_declaration</code></a>, 
      <a href="markupbase.ParserBase-class.html#parse_marked_section"><code>parse_marked_section</code></a>, 
      <a href="markupbase.ParserBase-class.html#updatepos"><code>updatepos</code></a>
    </td></tr>
</table><br />


<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Class Variable Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
<td><b><a href="HTMLParser.HTMLParser-class.html#CDATA_CONTENT_ELEMENTS"><code>CDATA_CONTENT_ELEMENTS</code></a></b> = <span title="('script', 'style')"><code>('script',&nbsp;'style')             </code>
</span></td></tr>
  <tr><td colspan="2">

    </td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>)</span>
    <br /><i>(Constructor)</i>
  </h3>
  Initialize and reset this instance.
  <dl><dt></dt><dd>
    <dl><dt><b>Overrides:</b></dt>
      <dd><a href="markupbase.ParserBase-class.html#__init__"><code>markupbase.ParserBase.__init__</code></a></dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="close"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">close</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  Handle any buffered data.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="feed"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">feed</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>data</span>)</span>
  </h3>
<pre class="literalblock">
Feed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '
').
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="get_starttag_text"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">get_starttag_text</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  Return full source of start tag: '&lt;...&gt;'.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="reset"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">reset</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  Reset this instance. Loses all unprocessed data.
  <dl><dt></dt><dd>
    <dl><dt><b>Overrides:</b></dt>
      <dd><a href="markupbase.ParserBase-class.html#reset"><code>markupbase.ParserBase.reset</code></a></dd>
    </dl>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Class Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="CDATA_CONTENT_ELEMENTS"></a>
<h3>CDATA_CONTENT_ELEMENTS</h3>
<dl>
  <dt></dt>
  <dd>
    <dl>
      <dt><b>Type:</b></dt>
      <dd>
          <code>tuple</code>

      </dd>
<span title="('script', 'style')">      <dt><b>Value:</b></dt>
      <dd><table><tr><td>
<pre class="variable">
('script', 'style')                                                    </pre>
        </td></tr></table></dd>
</span>    </dl>
  </dd>
</dl></td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri Dec 14 16:10:52 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
